<?php
# FileName="conexion.php"
# Type="MySQL"
# HTTP="true"
class GestorSQL{
	/* local */
	private $hostname_conexion = "almanimal.org";
	private $database_conexion = "webrutas";
	private $username_conexion = "webrutas";
	private $password_conexion = "LEGUCHOTEX5";

/* web prueba */
	/*private $hostname_conexion = "localhost";
	private $database_conexion = "webrutas";
	private $username_conexion = "webrutas";
	private $password_conexion = "LEGUCHOTEX5";
*/
	private $conn;

	function __construct(){
		$this->conn = mysqli_connect($this->hostname_conexion, $this->username_conexion, $this->password_conexion, $this->database_conexion) or trigger_error("Error al conectar a la base de datos, No se ha conectado a la base de datos", E_USER_ERROR);
	}

	function consultaBD($sql){
		$consulta = mysqli_query($this->conn, $sql);
		if ($consulta)
			return $consulta;
		else
		{	
			echo $consulta;
			die ("Error en la Consulta -> GestorSQL");
		}
	}

}



?>